package com.haiertvbic.tvwa;

import java.util.ArrayList;

import com.haiertvbic.tvwa.model.FavChannelBean;
import com.haiertvbic.tvwa.model.FavChannelPagekage;
import com.haiertvbic.tvwa.model.ProgramBean;
import com.haiertvbic.tvwa.network.EPGWeb;
import com.haiertvbic.tvwa.protocol.CAEProtocol;
import com.haiertvbic.tvwa.util.SLog;

import android.test.AndroidTestCase;

public class Test extends AndroidTestCase {
	private static final String TAG = "Test";
	public void test1() {
		ArrayList<ProgramBean> pro = EPGWeb.getProgramList(getContext(), 1);
		ArrayList<ProgramBean> cha_pro = EPGWeb.cacheTimeFilter(pro);
		for (int i = 0; i < cha_pro.size(); i++) {
			SLog.d(TAG, "第"+i+"个节目名字===="+cha_pro.get(i).getPn()+"播出的结束时间为："+cha_pro.get(i).getPftime());
		}
	}
	//测试cae
	public void test2(){
	FavChannelPagekage favcha =CAEProtocol.getFavChannel(1, 5);
	if (favcha != null) {
		ArrayList<FavChannelBean> chas = 	favcha.getChannels();
		for (int i = 0; i < chas.size(); i++) {
			SLog.d(TAG, "获取前五个频道号为："+chas.get(i).getChannel_id());
		}
	}
	
	}
}
